package cn.wolfcode.wolf2w.vo;

import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;
import java.util.Map;

@Getter
@Setter
public class TraveCondition {

    public static final Map<Integer, TraveCondition> TRAVEL_DAYS = new HashMap<>(); //出行天数

    public static final Map<Integer, TraveCondition> TRAVEL_PRE_EXPENDS = new HashMap<>(); // 出行费用

    public static final int TRAVEL_NEW = 1; //最新

    public static final int TRAVEL_HOT = 2; //最热

    static {
        TRAVEL_DAYS.put(-1, new TraveCondition(-1, Integer.MAX_VALUE));
        TRAVEL_DAYS.put(1, new TraveCondition(0, 3));
        TRAVEL_DAYS.put(2, new TraveCondition(4, 7));
        TRAVEL_DAYS.put(3, new TraveCondition(8, 14));
        TRAVEL_DAYS.put(4, new TraveCondition(15, Integer.MAX_VALUE));

        TRAVEL_PRE_EXPENDS.put(-1, new TraveCondition(-1, Integer.MAX_VALUE));
        TRAVEL_PRE_EXPENDS.put(1, new TraveCondition(1, 999));
        TRAVEL_PRE_EXPENDS.put(2, new TraveCondition(1000, 6000));
        TRAVEL_PRE_EXPENDS.put(3, new TraveCondition(6000, 20000));
        TRAVEL_PRE_EXPENDS.put(4, new TraveCondition(20000, Integer.MAX_VALUE));
    }

    private int min;

    private int max;

    public TraveCondition(int min, int max) {
        this.min = min;
        this.max = max;
    }
}
